/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.lihle.designpatterns.model.stractural.proxy;

import com.lihle.designpatterns.model.stractural.proxy.impl.SlowThing;
import java.util.Date;

/**
 *
 * @author user
 */
public class Proxy {
    SlowThing slowThing;
    
   // public Proxy(){}
   public Proxy(){
       System.out.println("Creatin proxy at "+ new Date());
   }
    
    public void sayHello(){
        if(slowThing == null){
            slowThing = new SlowThing();
        }
        slowThing.sayHello();
    }
}
